<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen: Catalogue of dense decompositions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__TopicLinearAlgebraDecompositions.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Catalogue of dense decompositions<div class="ingroups"><a class="el" href="group__DenseLinearSolvers__chapter.html">Dense linear problems and decompositions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>This page presents a catalogue of the dense matrix decompositions offered by <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a>. For an introduction on linear solvers and decompositions, check this <a class="el" href="group__TutorialLinearAlgebra.html">page </a>. To get an overview of the true relative speed of the different decompositions, check this <a class="el" href="group__DenseDecompositionBenchmark.html">benchmark </a>.</p>
<h1><a class="anchor" id="TopicLinAlgBigTable"></a>
Catalogue of decompositions offered by Eigen</h1>
<table class="manual-vl">
<tr>
<th class="meta"></th><th class="meta" colspan="5">Generic information, not Eigen-specific </th><th class="meta" colspan="3"><p class="starttd">Eigen-specific </p>
<p class="endtd"></p>
</th></tr>
<tr>
<th>Decomposition </th><th>Requirements on the matrix </th><th>Speed </th><th>Algorithm reliability and accuracy </th><th>Rank-revealing </th><th>Allows to compute (besides linear solving) </th><th>Linear solver provided by <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a> </th><th>Maturity of <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a>'s implementation </th><th><p class="starttd">Optimizations </p>
<p class="endtd"></p>
</th></tr>
<tr>
<td><a class="el" href="classEigen_1_1PartialPivLU.html" title="LU decomposition of a matrix with partial pivoting, and related features.">PartialPivLU</a> </td><td>Invertible </td><td>Fast </td><td>Depends on condition number </td><td>- </td><td>- </td><td>Yes </td><td>Excellent </td><td><p class="starttd">Blocking, Implicit MT </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features.">FullPivLU</a> </td><td>- </td><td>Slow </td><td>Proven </td><td>Yes </td><td>- </td><td>Yes </td><td>Excellent </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1HouseholderQR.html" title="Householder QR decomposition of a matrix.">HouseholderQR</a> </td><td>- </td><td>Fast </td><td>Depends on condition number </td><td>- </td><td>Orthogonalization </td><td>Yes </td><td>Excellent </td><td><p class="starttd">Blocking </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1ColPivHouseholderQR.html" title="Householder rank-revealing QR decomposition of a matrix with column-pivoting.">ColPivHouseholderQR</a> </td><td>- </td><td>Fast </td><td>Good </td><td>Yes </td><td>Orthogonalization </td><td>Yes </td><td>Excellent </td><td><p class="starttd"><em>-</em> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1FullPivHouseholderQR.html" title="Householder rank-revealing QR decomposition of a matrix with full pivoting.">FullPivHouseholderQR</a> </td><td>- </td><td>Slow </td><td>Proven </td><td>Yes </td><td>Orthogonalization </td><td>Yes </td><td>Average </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1CompleteOrthogonalDecomposition.html" title="Complete orthogonal decomposition (COD) of a matrix.">CompleteOrthogonalDecomposition</a> </td><td>- </td><td>Fast </td><td>Good </td><td>Yes </td><td>Orthogonalization </td><td>Yes </td><td>Excellent </td><td><p class="starttd"><em>-</em> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1LLT.html" title="Standard Cholesky decomposition (LL^T) of a matrix and associated features.">LLT</a> </td><td>Positive definite </td><td>Very fast </td><td>Depends on condition number </td><td>- </td><td>- </td><td>Yes </td><td>Excellent </td><td><p class="starttd">Blocking </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1LDLT.html" title="Robust Cholesky decomposition of a matrix with pivoting.">LDLT</a> </td><td>Positive or negative semidefinite<sup><a href="#note1">1</a></sup> </td><td>Very fast </td><td>Good </td><td>- </td><td>- </td><td>Yes </td><td>Excellent </td><td><p class="starttd"><em>Soon: blocking</em> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<th class="inter" colspan="9"><p class="starttd"><br  />
 Singular values and eigenvalues decompositions</p>
<p class="endtd"></p>
</th></tr>
<tr>
<td><a class="el" href="classEigen_1_1BDCSVD.html" title="class Bidiagonal Divide and Conquer SVD">BDCSVD</a> (divide &amp; conquer) </td><td>- </td><td>One of the fastest SVD algorithms </td><td>Excellent </td><td>Yes </td><td>Singular values/vectors, least squares </td><td>Yes (and does least squares) </td><td>Excellent </td><td><p class="starttd">Blocked bidiagonalization </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1JacobiSVD.html" title="Two-sided Jacobi SVD decomposition of a rectangular matrix.">JacobiSVD</a> (two-sided) </td><td>- </td><td>Slow (but fast for small matrices) </td><td>Proven<sup><a href="#note3">3</a></sup> </td><td>Yes </td><td>Singular values/vectors, least squares </td><td>Yes (and does least squares) </td><td>Excellent </td><td><p class="starttd">R-SVD </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1SelfAdjointEigenSolver.html" title="Computes eigenvalues and eigenvectors of selfadjoint matrices.">SelfAdjointEigenSolver</a> </td><td>Self-adjoint </td><td>Fast-average<sup><a href="#note2">2</a></sup> </td><td>Good </td><td>Yes </td><td>Eigenvalues/vectors </td><td>- </td><td>Excellent </td><td><p class="starttd"><em>Closed forms for 2x2 and 3x3</em> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1ComplexEigenSolver.html" title="Computes eigenvalues and eigenvectors of general complex matrices.">ComplexEigenSolver</a> </td><td>Square </td><td>Slow-very slow<sup><a href="#note2">2</a></sup> </td><td>Depends on condition number </td><td>Yes </td><td>Eigenvalues/vectors </td><td>- </td><td>Average </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1EigenSolver.html" title="Computes eigenvalues and eigenvectors of general matrices.">EigenSolver</a> </td><td>Square and real </td><td>Average-slow<sup><a href="#note2">2</a></sup> </td><td>Depends on condition number </td><td>Yes </td><td>Eigenvalues/vectors </td><td>- </td><td>Average </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1GeneralizedSelfAdjointEigenSolver.html" title="Computes eigenvalues and eigenvectors of the generalized selfadjoint eigen problem.">GeneralizedSelfAdjointEigenSolver</a> </td><td>Square </td><td>Fast-average<sup><a href="#note2">2</a></sup> </td><td>Depends on condition number </td><td>- </td><td>Generalized eigenvalues/vectors </td><td>- </td><td>Good </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr>
<th class="inter" colspan="9"><p class="starttd"><br  />
 Helper decompositions</p>
<p class="endtd"></p>
</th></tr>
<tr>
<td><a class="el" href="classEigen_1_1RealSchur.html" title="Performs a real Schur decomposition of a square matrix.">RealSchur</a> </td><td>Square and real </td><td>Average-slow<sup><a href="#note2">2</a></sup> </td><td>Depends on condition number </td><td>Yes </td><td>- </td><td>- </td><td>Average </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1ComplexSchur.html" title="Performs a complex Schur decomposition of a real or complex square matrix.">ComplexSchur</a> </td><td>Square </td><td>Slow-very slow<sup><a href="#note2">2</a></sup> </td><td>Depends on condition number </td><td>Yes </td><td>- </td><td>- </td><td>Average </td><td><p class="starttd">- </p>
<p class="endtd"></p>
</td></tr>
<tr class="alt">
<td><a class="el" href="classEigen_1_1Tridiagonalization.html" title="Tridiagonal decomposition of a selfadjoint matrix.">Tridiagonalization</a> </td><td>Self-adjoint </td><td>Fast </td><td>Good </td><td>- </td><td>- </td><td>- </td><td>Good </td><td><p class="starttd"><em>Soon: blocking</em> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td><a class="el" href="classEigen_1_1HessenbergDecomposition.html" title="Reduces a square matrix to Hessenberg form by an orthogonal similarity transformation.">HessenbergDecomposition</a> </td><td>Square </td><td>Average </td><td>Good </td><td>- </td><td>- </td><td>- </td><td>Good </td><td><p class="starttd"><em>Soon: blocking</em> </p>
<p class="endtd"></p>
</td></tr>
</table>
<p><b>Notes:</b> </p><ul>
<li>
<a class="anchor" id="note1"></a><b>1</b>: There exist two variants of the <a class="el" href="classEigen_1_1LDLT.html" title="Robust Cholesky decomposition of a matrix with pivoting.">LDLT</a> algorithm. <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a>'s one produces a pure diagonal D matrix, and therefore it cannot handle indefinite matrices, unlike Lapack's one which produces a block diagonal D matrix. </li>
<li>
<a class="anchor" id="note2"></a><b>2</b>: Eigenvalues, SVD and Schur decompositions rely on iterative algorithms. Their convergence speed depends on how well the eigenvalues are separated. </li>
<li>
<a class="anchor" id="note3"></a><b>3</b>: Our <a class="el" href="classEigen_1_1JacobiSVD.html" title="Two-sided Jacobi SVD decomposition of a rectangular matrix.">JacobiSVD</a> is two-sided, making for proven and optimal precision for square matrices. For non-square matrices, we have to use a QR preconditioner first. The default choice, <a class="el" href="classEigen_1_1ColPivHouseholderQR.html" title="Householder rank-revealing QR decomposition of a matrix with column-pivoting.">ColPivHouseholderQR</a>, is already very reliable, but if you want it to be proven, use <a class="el" href="classEigen_1_1FullPivHouseholderQR.html" title="Householder rank-revealing QR decomposition of a matrix with full pivoting.">FullPivHouseholderQR</a> instead. </li>
</ul>
<h1><a class="anchor" id="TopicLinAlgTerminology"></a>
Terminology</h1>
<dl>
<dt><b>Selfadjoint</b> </dt>
<dd>For a real matrix, selfadjoint is a synonym for symmetric. For a complex matrix, selfadjoint is a synonym for <em>hermitian</em>. More generally, a matrix \( A \) is selfadjoint if and only if it is equal to its adjoint \( A^* \). The adjoint is also called the <em>conjugate</em> <em>transpose</em>.  </dd>
<dt><b>Positive/negative definite</b> </dt>
<dd>A selfadjoint matrix \( A \) is positive definite if \( v^* A v &gt; 0 \) for any non zero vector \( v \). In the same vein, it is negative definite if \( v^* A v &lt; 0 \) for any non zero vector \( v \)  </dd>
<dt><b>Positive/negative semidefinite</b> </dt>
<dd><p class="startdd">A selfadjoint matrix \( A \) is positive semi-definite if \( v^* A v \ge 0 \) for any non zero vector \( v \). In the same vein, it is negative semi-definite if \( v^* A v \le 0 \) for any non zero vector \( v \) </p>
<p class="enddd"></p>
</dd>
<dt><b>Blocking</b> </dt>
<dd>Means the algorithm can work per block, whence guaranteeing a good scaling of the performance for large matrices. </dd>
<dt><b>Implicit Multi Threading (MT)</b> </dt>
<dd>Means the algorithm can take advantage of multicore processors via OpenMP. "Implicit" means the algorithm itself is not parallelized, but that it relies on parallelized matrix-matrix product routines. </dd>
<dt><b>Explicit Multi Threading (MT)</b> </dt>
<dd>Means the algorithm is explicitly parallelized to take advantage of multicore processors via OpenMP. </dd>
<dt><b>Meta-unroller</b> </dt>
<dd>Means the algorithm is automatically and explicitly unrolled for very small fixed size matrices. </dd>
<dt><b></b> </dt>
<dd></dd>
</dl>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Apr 21 2022 13:07:55 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
